# -*- coding: utf-8 -*-
# @Time    : 2023/6/3 19:23
# @Author  : hyh
# @Email   : 935887145@qq.com
# @File    : open_vip_page.py
# @Software: PyCharm
from pages.base_page import BasePage
from appium import webdriver
from tools import driver
from appium.webdriver.common.mobileby import MobileBy as By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import  expected_conditions as EC

class OpenVipPage(BasePage):
    kitchen_vip_locator = (By.XPATH,'//*[@resource-id="com.xiachufang:id/tv_prime1"]')#开通下厨房会员
    vip_zhongxin_locator = (By.XPATH,'//*[@resource-id="com.xiachufang:id/navigation_bar_title_layout"]')
    def kitchen_vip(self):   #点击开通会员按钮
        self.find_element(self.kitchen_vip_locator).click()
    def get_text(self):      #获取文本信息
        current_text = self.find_element(self.vip_zhongxin_locator).get_attribute('text')
        return current_text
